Skip to content

ucloud: update ports to match new Arduino CA. #94

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Mar 4, 2025

Conversation

rjtokenring
Copy link
Contributor

Due to the switch at broker level, move certificate based authenticates clients to port 8885

@iabdalkader
Copy link
Collaborator

@rjtokenring rjtokenring force-pushed the Update-default-broker-ports branch from 9e8bed1 to bd04f84 Compare March 3, 2025 13:05
@rjtokenring
Copy link
Contributor Author

Do we also need to update CA data?

https://github.com/arduino/arduino-iot-cloud-py/blob/main/src/arduino_iot_cloud/__init__.py#L14

yes, thanks. Do you know if it's pem or der encoded?

@iabdalkader
Copy link
Collaborator

yes, thanks. Do you know if it's pem or der encoded?

DER

@iabdalkader
Copy link
Collaborator

I can't connect with mosquitto either. I tried this root certificate, and I also tried to download one myself:

openssl s_client -showcerts -connect iot.arduino.cc:8885 </dev/null | openssl x509 -outform PEM > ca-root.pem
mosquitto_sub --cafile ca-root.pem --cert cert.pem --key key.pem -d -h mqtts-sa.iot.arduino.cc -p 8885 -i ${DEVICE_ID} -v --tls-version tlsv1.2 -q 0 -t "/a/d/${DEVICE_ID}/e/i"

I got:

OpenSSL Error[0]: error:0A000086:SSL routines::certificate verify failed
Error: Protocol error

@mirkokurt
Copy link

I can't connect with mosquitto either. I tried this root certificate, and I also tried to download one myself:

openssl s_client -showcerts -connect iot.arduino.cc:8885 </dev/null | openssl x509 -outform PEM > ca-root.pem
mosquitto_sub --cafile ca-root.pem --cert cert.pem --key key.pem -d -h mqtts-sa.iot.arduino.cc -p 8885 -i ${DEVICE_ID} -v --tls-version tlsv1.2 -q 0 -t "/a/d/${DEVICE_ID}/e/i"

I got:

OpenSSL Error[0]: error:0A000086:SSL routines::certificate verify failed
Error: Protocol error

since the CA is changed, to restore the CI we have to produce a new cert.pem signed with the new CA (for each device). Github action secrets are write-only, is there any other way we can retrieve their values?

@iabdalkader
Copy link
Collaborator

since the CA is changed, to restore the CI we have to produce a new cert.pem signed with the new CA (for each device). Github action secrets are write-only, is there any other way we can retrieve their values?

Does this mean that all provisioned devices will stop working? That sounds bad.
I can update the secrets, but will need to provision a new device.

@Bodobolero
Copy link

Bodobolero commented Mar 3, 2025

since the CA is changed, to restore the CI we have to produce a new cert.pem signed with the new CA (for each device). Github action secrets are write-only, is there any other way we can retrieve their values?

Does this mean that all provisioned devices will stop working? That sounds bad. I can update the secrets, but will need to provision a new device.

Actually my device already stopped working already Feb 24 for no obvious reason and can no longer connect to the MQTT broker.

note that I got an email from Arduino "Important Security Update Required for Arduino Cloud Devices"
Please note that the update will need to be completed by Feb 16th.In order to continue to ensure a reliable and secure connection between your IoT devices and Arduino Cloud, we need you to update the security credentials stored on your IoT devices

I followed all the steps mid February and my device continued working after my changes (and successfully removed the "requires update" icon in the web UI on cloud.arduino.cc under Devices) until it stopped working Feb 24 without me changing anything. It is Arduino RP2040 connect.

@rjtokenring
I am really disappointed how Arduino manages and especially communicates these changes without deeper technical explanations that help the makers self-resolve those problems. Not to mention the difficulties to get the create agent running on MacOS after you changed the required/expired HTTPS root cert to authenticate the create agent with the Browser.

I was even giving Arduino classes recommending the IoT cloud but I will stop doing this.
As long as the ArduinoIotCloud server side is a black box that violates the Arduino Open source principles it is impossible to resolve issues and official support just doesn't scale and work.

Sorry for hi-jacking this PR with my comments but I hope it finds the right audience this way.

@iabdalkader
Copy link
Collaborator

iabdalkader commented Mar 4, 2025

note that I got an email from Arduino "Important Security Update Required for Arduino Cloud Devices"

@Bodobolero I missed that email, but I can't access my devices anyway.

@mirkokurt @rjtokenring Can you regenerate a device certificate if I send you the device ID and/or API key? Or should I just try to create a new device?

@rjtokenring
Copy link
Contributor Author

note that I got an email from Arduino "Important Security Update Required for Arduino Cloud Devices"

@Bodobolero I missed that email, but I can't access my devices anyway.

@mirkokurt @rjtokenring Can you regenerate a device certificate if I send you the device ID and/or API key? Or should I just try to create a new device?

Please provide device-id, so we can re-sign it.

@Bodobolero
Copy link

Please provide device-id, so we can re-sign it.

mine is b02e929f-de77-40c1-bc48-000be066c944

@iabdalkader
Copy link
Collaborator

mine is b02e929f-de77-40c1-bc48-000be066c944

@Bodobolero That was for me to provide the device id used for the CI.

@iabdalkader
Copy link
Collaborator

The CI test now passes.

@pennam pennam force-pushed the Update-default-broker-ports branch from 7367aa7 to d6a1577 Compare March 4, 2025 15:21
@pennam pennam changed the title Update ports to match new Arduino CA ucloud: update ports to match new Arduino CA Mar 4, 2025
@pennam pennam force-pushed the Update-default-broker-ports branch from 0a46728 to 1ca1252 Compare March 4, 2025 15:38
@pennam pennam force-pushed the Update-default-broker-ports branch from 1ca1252 to 4ebcd12 Compare March 4, 2025 15:55
@iabdalkader iabdalkader changed the title ucloud: update ports to match new Arduino CA ucloud: Update ports to match new Arduino CA. Mar 4, 2025
@pennam pennam changed the title ucloud: Update ports to match new Arduino CA. ucloud: update ports to match new Arduino CA. Mar 4, 2025
@pennam pennam force-pushed the Update-default-broker-ports branch from 4ebcd12 to 0d3aadf Compare March 4, 2025 16:01
@iabdalkader iabdalkader merged commit 5791f0f into main Mar 4, 2025
4 checks passed
@iabdalkader iabdalkader deleted the Update-default-broker-ports branch March 4, 2025 16:31
@mirkokurt
Copy link

mirkokurt commented Mar 5, 2025

b02e929f-de77-40c1-bc48-000be066c944

@Bodobolero An automatic migration of all device certificates has been made for security reasons. The migration has been applied leveraging the cloud editor for RP2040. I've checked and the certificate of your device has been re-signed and the library version has been updated so your device should be able to connect. If this is not the case as you said, we can investigate. But this is not the right place. Please post in the forum and we will help you.

@Bodobolero
Copy link

b02e929f-de77-40c1-bc48-000be066c944

@Bodobolero An automatic migration of all device certificates has been made for security reasons. The migration has been applied leveraging the cloud editor for RP2040. I've checked and the certificate of your device has been re-signed and the library version has been updated so your device should be able to connect. If this is not the case as you said, we can investigate. But this is not the right place. Please post in the forum and we will help you.

Another user failing arduino-libraries/ArduinoIoTCloud#534

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants